package com.example.shop.tool;

public  enum StandardExceptionCode implements ExceptionCodeSupplier{
    SUCCESS(0),
    BAD_REQUEST(1122),
    MAPPING_NOT_FOUND(4004),
    UNAUTHORIZED(4001),
    FORBIDDEN(4003),
    INTERNAL_ERROR(9999);

    private final int codeSuffix;

    private StandardExceptionCode(int codeSuffix) {
        this.check(codeSuffix);
        this.codeSuffix = codeSuffix;
    }

    public Integer get() {
        return this.codeSuffix;
    }
}